<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   Spark安装和使用  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/10345.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466461348: Accept with keywords: (title(0.333333333333):Spark,数盟,社区, topn(0.4):社区,数盟,编译,机器,自带,目录,数据分析,文件,配置文件,Python,hadoop,模式,例子,基础架构,文章,集群,Spark,源代码,节点,管理器,python,Hadoop,核数,环境变量,客户端,脚本,参数,线程,版本,spark).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    Spark安装和使用
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    Spark安装和使用 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,57] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech/base">
       基础架构
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/10345.html">
          Spark安装和使用
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          8,352 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech/base" rel="category tag">
          基础架构
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <p>
        作者：
        <a class="mr5" href="http://segmentfault.com/u/javachen">
         <strong>
          JavaChen
         </strong>
        </a>
       </p>
       <p>
        本文主要记录 Spark 的安装过程配置过程并测试 Spark 的一些基本使用方法。
       </p>
       <p>
        安装环境如下：
       </p>
       <ul>
        <li>
         操作系统：CentOs 6.5
        </li>
        <li>
         Hadoop 版本：CDH-5.3.0
        </li>
        <li>
         Spark 版本：1.2
        </li>
       </ul>
       <p>
        关于 yum 源的配置以及 Hadoop 集群的安装，请参考
        <a href="http://blog.javachen.com/2013/04/06/install-cloudera-cdh-by-yum" rel="nofollow" target="_blank">
         使用yum安装CDH Hadoop集群
        </a>
        。
       </p>
       <h1 id="articleHeader0">
        1. 安装
       </h1>
       <p>
        选择一个节点 cdh1 来安装 Spark ，首先查看 Spark 相关的包有哪些：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e09404781758" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ yum list |grep spark
spark-core.noarch                 &lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;+cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;+&lt;span class="hljs-number"&gt;364&lt;/span&gt;-&lt;span class="hljs-number"&gt;1&lt;/span&gt;.cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.p0.&lt;span class="hljs-number"&gt;36&lt;/span&gt;.el6 @cdh
spark-history-server.noarch       &lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;+cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;+&lt;span class="hljs-number"&gt;364&lt;/span&gt;-&lt;span class="hljs-number"&gt;1&lt;/span&gt;.cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.p0.&lt;span class="hljs-number"&gt;36&lt;/span&gt;.el6 @cdh
spark-master.noarch               &lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;+cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;+&lt;span class="hljs-number"&gt;364&lt;/span&gt;-&lt;span class="hljs-number"&gt;1&lt;/span&gt;.cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.p0.&lt;span class="hljs-number"&gt;36&lt;/span&gt;.el6 @cdh
spark-python.noarch               &lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;+cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;+&lt;span class="hljs-number"&gt;364&lt;/span&gt;-&lt;span class="hljs-number"&gt;1&lt;/span&gt;.cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.p0.&lt;span class="hljs-number"&gt;36&lt;/span&gt;.el6 @cdh
spark-worker.noarch               &lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;+cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;+&lt;span class="hljs-number"&gt;364&lt;/span&gt;-&lt;span class="hljs-number"&gt;1&lt;/span&gt;.cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.p0.&lt;span class="hljs-number"&gt;36&lt;/span&gt;.el6 @cdh
hue-spark.x86_64                  &lt;span class="hljs-number"&gt;3.7&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;+cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;+&lt;span class="hljs-number"&gt;134&lt;/span&gt;-&lt;span class="hljs-number"&gt;1&lt;/span&gt;.cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.p0.&lt;span class="hljs-number"&gt;24&lt;/span&gt;.el6 cdh
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e09404781758-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e09404781758-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e09404781758-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e09404781758-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e09404781758-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e09404781758-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e09404781758-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e09404781758-8">
               8
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e09404781758-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                yum
               </span>
               <span class="crayon-v">
                list
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                |
               </span>
               <span class="crayon-e">
                grep
               </span>
               <span class="crayon-e">
                spark
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e09404781758-2">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                core
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                noarch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                364
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                p0
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                36
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                el6
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-e">
                cdh
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e09404781758-3">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                history
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                server
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                noarch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                364
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                p0
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                36
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                el6
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-e">
                cdh
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e09404781758-4">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                master
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                noarch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                364
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                p0
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                36
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                el6
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-e">
                cdh
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e09404781758-5">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                python
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                noarch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                364
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                p0
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                36
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                el6
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-e">
                cdh
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e09404781758-6">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                worker
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                noarch
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                364
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                p0
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                36
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                el6
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-e">
                cdh
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e09404781758-7">
               <span class="crayon-v">
                hue
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                x86_64
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.7
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                134
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                p0
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                24
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                el6
               </span>
               <span class="crayon-i">
                cdh
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e09404781758-8">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0643 seconds] -->
       <p>
        以上包作用如下：
       </p>
       <ul>
        <li>
         spark-core: spark 核心功能
        </li>
        <li>
         spark-worker: spark-worker 初始化脚本
        </li>
        <li>
         spark-master: spark-master 初始化脚本
        </li>
        <li>
         spark-python: spark 的 Python 客户端
        </li>
        <li>
         hue-spark: spark 和 hue 集成包
        </li>
        <li>
         spark-history-server
        </li>
       </ul>
       <p>
        你可以根据你的集群部署规划来安装组件，在 cdh1 上安装 master，在 cdh1、cdh2、cdh3 上安装 worker：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e1c308151950" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-comment"&gt;# 在 cdh1 节点上运行&lt;/span&gt;
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; yum install spark-core spark-master spark-worker spark-python spark-history-server -y

&lt;span class="hljs-comment"&gt;# 在 cdh2、cdh3 上运行&lt;/span&gt;
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; yum install spark-core spark-worker spark-python -y
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e1c308151950-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e1c308151950-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e1c308151950-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e1c308151950-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e1c308151950-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e1c308151950-6">
               6
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e1c308151950-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # 在 cdh1 节点上运行&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e1c308151950-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                yum
               </span>
               <span class="crayon-e">
                install
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                core
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                worker
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                python
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                history
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                server
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                y
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e1c308151950-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e1c308151950-4">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # 在 cdh2、cdh3 上运行&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e1c308151950-5">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                yum
               </span>
               <span class="crayon-e">
                install
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                core
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                worker
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                python
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                y
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e1c308151950-6">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0111 seconds] -->
       <p>
        安装成功后，我的集群部署如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e23386047907" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-attribute"&gt;cdh1节点&lt;/span&gt;: &lt;span class="hljs-string"&gt; spark-master spark-history-server&lt;/span&gt;
&lt;span class="hljs-attribute"&gt;cdh2节点&lt;/span&gt;: &lt;span class="hljs-string"&gt; spark-worker &lt;/span&gt;
&lt;span class="hljs-attribute"&gt;cdh3节点&lt;/span&gt;: &lt;span class="hljs-string"&gt; spark-worker &lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e23386047907-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e23386047907-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e23386047907-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e23386047907-4">
               4
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e23386047907-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-attribute"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-i">
                cdh1
               </span>
               节点
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                history
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                server
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e23386047907-2">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-attribute"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-i">
                cdh2
               </span>
               节点
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                worker
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e23386047907-3">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-attribute"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-i">
                cdh3
               </span>
               节点
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                worker
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e23386047907-4">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0114 seconds] -->
       <p>
       </p>
       <h1 id="articleHeader1">
        2. 配置
       </h1>
       <h2 id="articleHeader2">
        2.1 修改配置文件
       </h2>
       <p>
        设置环境变量，在
        <code>
         .bashrc
        </code>
        中加入下面一行，并使其生效：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e2a981904692" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_HOME=/usr/lib/spark
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e2a981904692-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e2a981904692-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e2a981904692-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_HOME
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                spark
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e2a981904692-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0011 seconds] -->
       <p>
        可以修改配置文件
        <code>
         /etc/spark/conf/spark-env.sh
        </code>
        ，其内容如下，你可以根据需要做一些修改：修改 master 的主机名称。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e30535049175" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-comment"&gt;# 设置 master 主机名称&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; STANDALONE_SPARK_MASTER_HOST=cdh1

&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_MASTER_IP=&lt;span class="hljs-variable"&gt;$STANDALONE_SPARK_MASTER_HOST&lt;/span&gt;

&lt;span class="hljs-comment"&gt;### Let's run everything with JVM runtime, instead of Scala&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_LAUNCH_WITH_SCALA=&lt;span class="hljs-number"&gt;0&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_LIBRARY_PATH=&lt;span class="hljs-variable"&gt;${SPARK_HOME}&lt;/span&gt;/lib
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SCALA_LIBRARY_PATH=&lt;span class="hljs-variable"&gt;${SPARK_HOME}&lt;/span&gt;/lib
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_MASTER_WEBUI_PORT=&lt;span class="hljs-number"&gt;18080&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_MASTER_PORT=&lt;span class="hljs-number"&gt;7077&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_WORKER_PORT=&lt;span class="hljs-number"&gt;7078&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_WORKER_WEBUI_PORT=&lt;span class="hljs-number"&gt;18081&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_WORKER_DIR=/var/run/spark/work
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_LOG_DIR=/var/log/spark

&lt;span class="hljs-keyword"&gt;if&lt;/span&gt; [ -n &lt;span class="hljs-string"&gt;"&lt;span class="hljs-variable"&gt;$HADOOP_HOME&lt;/span&gt;"&lt;/span&gt; ]; &lt;span class="hljs-keyword"&gt;then&lt;/span&gt;
  &lt;span class="hljs-keyword"&gt;export&lt;/span&gt; LD_LIBRARY_PATH=&lt;span class="hljs-variable"&gt;$LD_LIBRARY_PATH&lt;/span&gt;:&lt;span class="hljs-variable"&gt;${HADOOP_HOME}&lt;/span&gt;/lib/native
&lt;span class="hljs-keyword"&gt;fi&lt;/span&gt;

&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; HIVE_CONF_DIR=&lt;span class="hljs-variable"&gt;${HIVE_CONF_DIR:-/etc/hive/conf}&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; HADOOP_CONF_DIR=&lt;span class="hljs-variable"&gt;${HADOOP_CONF_DIR:-/etc/hadoop/conf}&lt;/span&gt;

&lt;span class="hljs-comment"&gt;### Comment above 2 lines and uncomment the following if&lt;/span&gt;
&lt;span class="hljs-comment"&gt;### you want to run with scala version, that is included with the package&lt;/span&gt;
&lt;span class="hljs-comment"&gt;#export SCALA_HOME=${SCALA_HOME:-/usr/lib/spark/scala}&lt;/span&gt;
&lt;span class="hljs-comment"&gt;#export PATH=$PATH:$SCALA_HOME/bin&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e30535049175-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e30535049175-28">
               28
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # 设置 master 主机名称&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-2">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                STANDALONE_SPARK_MASTER_HOST
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                cdh1
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-4">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_MASTER_IP
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                STANDALONE_SPARK_MASTER_HOST
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-5">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-6">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                ### Let's run everything with JVM runtime, instead of Scala&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-7">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_LAUNCH_WITH_SCALA
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-8">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_LIBRARY_PATH
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                SPARK_HOME
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-9">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SCALA_LIBRARY_PATH
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                SPARK_HOME
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-10">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_MASTER_WEBUI_PORT
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                18080
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-11">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_MASTER_PORT
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                7077
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-12">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_WORKER_PORT
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                7078
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-13">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_WORKER_WEBUI_PORT
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                18081
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-14">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_WORKER_DIR
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-t">
                var
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                run
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                work
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-15">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_LOG_DIR
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-t">
                var
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                log
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-16">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-17">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                n
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "&lt;span class="
               </span>
               <span class="crayon-v">
                hljs
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                variable
               </span>
               <span class="crayon-s">
                "&gt;$HADOOP_HOME&lt;/span&gt;"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-st">
                then
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                LD_LIBRARY_PATH
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                LD_LIBRARY_PATH
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                HADOOP_HOME
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-m">
                native
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-19">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                fi
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-20">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-21">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                HIVE_CONF_DIR
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                HIVE_CONF_DIR
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                hive
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-22">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                HADOOP_CONF_DIR
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                HADOOP_CONF_DIR
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-23">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-24">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                ### Comment above 2 lines and uncomment the following if&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-25">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                ### you want to run with scala version, that is included with the package&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-26">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                #export SCALA_HOME=${SCALA_HOME:-/usr/lib/spark/scala}&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e30535049175-27">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                #export PATH=$PATH:$SCALA_HOME/bin&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e30535049175-28">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0301 seconds] -->
       <p>
        如果你和我一样使用的是虚拟机运行 spark，则你可能需要修改 spark 进程使用的 jvm 大小（关于 jvm 大小设置的相关逻辑见 /usr/lib/spark/bin/spark-class）：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e37302358397" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_DAEMON_MEMORY=&lt;span class="hljs-number"&gt;256&lt;/span&gt;m
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e37302358397-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e37302358397-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e37302358397-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_DAEMON_MEMORY
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                256
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-i">
                m
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e37302358397-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0013 seconds] -->
       <p>
        修改完 cdh1 节点上的配置文件之后，需要同步到其他节点：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e3d963021879" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          scp -r /etc/spark/conf  cdh2:/etc/spark
scp -r /etc/spark/conf  cdh3:/etc/spark
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e3d963021879-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e3d963021879-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e3d963021879-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e3d963021879-1">
               <span class="crayon-v">
                scp
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                r
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                conf
               </span>
               <span class="crayon-v">
                cdh2
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                spark
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e3d963021879-2">
               <span class="crayon-v">
                scp
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                r
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                conf
               </span>
               <span class="crayon-v">
                cdh3
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                spark
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e3d963021879-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0016 seconds] -->
       <p>
       </p>
       <h2 id="articleHeader3">
        2.2 配置 Spark History Server
       </h2>
       <p>
        执行下面命令：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e43981784209" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; -u hdfs hadoop fs -mkdir /user/spark
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; -u hdfs hadoop fs -mkdir /user/spark/applicationHistory
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; -u hdfs hadoop fs -chown -R spark:spark /user/spark
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; -u hdfs hadoop fs -chmod &lt;span class="hljs-number"&gt;1777&lt;/span&gt; /user/spark/applicationHistory
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e43981784209-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e43981784209-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e43981784209-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e43981784209-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e43981784209-5">
               5
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e43981784209-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hdfs
               </span>
               <span class="crayon-e">
                hadoop
               </span>
               <span class="crayon-v">
                fs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                mkdir
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                spark
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e43981784209-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hdfs
               </span>
               <span class="crayon-e">
                hadoop
               </span>
               <span class="crayon-v">
                fs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                mkdir
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                applicationHistory
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e43981784209-3">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hdfs
               </span>
               <span class="crayon-e">
                hadoop
               </span>
               <span class="crayon-v">
                fs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                chown
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                R
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                spark
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e43981784209-4">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                u
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hdfs
               </span>
               <span class="crayon-e">
                hadoop
               </span>
               <span class="crayon-v">
                fs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                chmod
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1777
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                applicationHistory
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e43981784209-5">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0051 seconds] -->
       <p>
        在 Spark 客户端创建
        <code>
         /etc/spark/conf/spark-defaults.conf
        </code>
        ：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e49693123031" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          cp /etc/spark/conf/spark-defaults.conf.template /etc/spark/conf/spark-defaults.conf
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e49693123031-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e49693123031-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e49693123031-1">
               <span class="crayon-v">
                cp
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                defaults
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                template
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                etc
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                defaults
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                conf
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e49693123031-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0013 seconds] -->
       <p>
        在
        <code>
         /etc/spark/conf/spark-defaults.conf
        </code>
        添加两行：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e4f544179709" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          spark.eventLog.dir=&lt;span class="hljs-regexp"&gt;/user/&lt;/span&gt;spark/applicationHistory
spark.eventLog.enabled=&lt;span class="hljs-literal"&gt;true&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e4f544179709-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e4f544179709-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e4f544179709-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e4f544179709-1">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                eventLog
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                dir
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-regexp"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                applicationHistory
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e4f544179709-2">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                eventLog
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                enabled
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-literal"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-t">
                true
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e4f544179709-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0019 seconds] -->
       <p>
        如果想 YARN ResourceManager 访问 Spark History Server ，则添加一行：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e55329293420" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          spark.yarn.historyServer.address=http:&lt;span class="hljs-comment"&gt;//HISTORY_HOST:HISTORY_PORT&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e55329293420-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e55329293420-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e55329293420-1">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                yarn
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                historyServer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                address
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                http
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-c">
                //HISTORY_HOST:HISTORY_PORT&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e55329293420-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0010 seconds] -->
       <p>
        最后，spark-defaults.conf 内容如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e5a493296525" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          spark.master=spark:&lt;span class="hljs-comment"&gt;//cdh1:7077&lt;/span&gt;
spark.eventLog.dir=&lt;span class="hljs-regexp"&gt;/user/&lt;/span&gt;spark/applicationHistory
spark.eventLog.enabled=&lt;span class="hljs-literal"&gt;true&lt;/span&gt;

spark.yarn.historyServer.address=http:&lt;span class="hljs-comment"&gt;//cdh1:19888&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e5a493296525-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e5a493296525-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e5a493296525-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e5a493296525-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e5a493296525-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e5a493296525-6">
               6
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e5a493296525-1">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                master
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-c">
                //cdh1:7077&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e5a493296525-2">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                eventLog
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                dir
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-regexp"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                applicationHistory
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e5a493296525-3">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                eventLog
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                enabled
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-literal"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-t">
                true
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e5a493296525-4">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e5a493296525-5">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                yarn
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                historyServer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                address
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                http
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-c">
                //cdh1:19888&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e5a493296525-6">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0029 seconds] -->
       <p>
        Spark History Server 中的
        <code>
         spark.history.provider
        </code>
        参数默认配置为
        <code>
         org.apache.spark.deploy.history.FsHistoryProvider
        </code>
        时，需要配置
        <code>
         spark.history.fs.logDirectory
        </code>
        参数，该参数在 spark-env.sh 中添加
        <code>
         SPARK_HISTORY_OPTS
        </code>
        环境变量：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e61290743674" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-comment"&gt;#这里配置的是本地目录，也可以改为 hdfs 上的目录&lt;/span&gt;
&lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_HISTORY_OPTS=&lt;span class="hljs-string"&gt;"&lt;span class="hljs-variable"&gt;$SPARK_HISTORY_OPTS&lt;/span&gt; -Dspark.history.fs.logDirectory=/var/log/spark"&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e61290743674-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e61290743674-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e61290743674-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e61290743674-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                #这里配置的是本地目录，也可以改为 hdfs 上的目录&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e61290743674-2">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_HISTORY_OPTS
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "&lt;span class="
               </span>
               <span class="crayon-v">
                hljs
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                variable
               </span>
               <span class="crayon-s">
                "&gt;$SPARK_HISTORY_OPTS&lt;/span&gt; -Dspark.history.fs.logDirectory=/var/log/spark"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e61290743674-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0016 seconds] -->
       <p>
        如果，集群配置了 kerberos ，则还需要开启 kerberos 认证，涉及到下面三个参数：
       </p>
       <ul>
        <li>
         <code>
          spark.history.kerberos.enabled
         </code>
         ：是否开启 kerberos 认证
        </li>
        <li>
         <code>
          spark.history.kerberos.principal
         </code>
         ：HistoryServer 的 kerberos 主体名称，注意：这里直接使用机器的
         <code>
          hostname
         </code>
         而不要使用
         <code>
          _HOST
         </code>
        </li>
        <li>
         <code>
          spark.history.kerberos.keytab
         </code>
         ：HistoryServer 的kerberos keytab文件位置
        </li>
       </ul>
       <p>
        另外，还开启了
        <code>
         spark.history.ui.acls.enable
        </code>
        （授权用户查看应用程序信息的时候是否检查acl），在 spark-env.sh 中继续添加：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e67801234668" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-keyword"&gt;export&lt;/span&gt; SPARK_HISTORY_OPTS=&lt;span class="hljs-string"&gt;"&lt;span class="hljs-variable"&gt;$SPARK_HISTORY_OPTS&lt;/span&gt; -Dspark.history.kerberos.enabled=true -Dspark.history.kerberos.principal=spark/cdh1@LASHOU.COM -Dspark.history.kerberos.keytab=/etc/spark/conf/spark.keytab -Dspark.history.ui.acls.enable=true"&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e67801234668-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e67801234668-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e67801234668-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_HISTORY_OPTS
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "&lt;span class="
               </span>
               <span class="crayon-v">
                hljs
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                variable
               </span>
               <span class="crayon-s">
                "&gt;$SPARK_HISTORY_OPTS&lt;/span&gt; -Dspark.history.kerberos.enabled=true -Dspark.history.kerberos.principal=spark/cdh1@LASHOU.COM -Dspark.history.kerberos.keytab=/etc/spark/conf/spark.keytab -Dspark.history.ui.acls.enable=true"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e67801234668-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0014 seconds] -->
       <p>
       </p>
       <h1 id="articleHeader4">
        3. 启动和停止
       </h1>
       <h3 id="articleHeader5">
        使用系统服务管理集群
       </h3>
       <p>
        启动脚本：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e6d331148425" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-comment"&gt;# 在 cdh1 节点上运行&lt;/span&gt;
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; service spark-master start

&lt;span class="hljs-comment"&gt;# 在 cdh1、cdh2、cdh3 节点上运行&lt;/span&gt;
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; service spark-worker start
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e6d331148425-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e6d331148425-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e6d331148425-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e6d331148425-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e6d331148425-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e6d331148425-6">
               6
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e6d331148425-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # 在 cdh1 节点上运行&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e6d331148425-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                service
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                start
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e6d331148425-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e6d331148425-4">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # 在 cdh1、cdh2、cdh3 节点上运行&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e6d331148425-5">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                service
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                worker
               </span>
               <span class="crayon-i">
                start
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e6d331148425-6">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0024 seconds] -->
       <p>
        停止脚本：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e73501902585" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; service spark-worker stop
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; service spark-master stop
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e73501902585-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e73501902585-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e73501902585-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e73501902585-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                service
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                worker
               </span>
               <span class="crayon-i">
                stop
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e73501902585-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                service
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-i">
                stop
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e73501902585-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0017 seconds] -->
       <p>
        当然，你还可以设置开机启动：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e79195574928" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; chkconfig spark-worker on
$ &lt;span class="hljs-built_in"&gt;sudo&lt;/span&gt; chkconfig spark-master on
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e79195574928-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e79195574928-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e79195574928-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e79195574928-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                chkconfig
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                worker
               </span>
               <span class="crayon-i">
                on
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e79195574928-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sudo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                chkconfig
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-i">
                on
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e79195574928-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0018 seconds] -->
       <p>
        运行日志保存在
        <code>
         /var/log/spark
        </code>
        ，你可以通过
        <a href="http://cdh1:18080/" rel="nofollow" target="_blank">
         http://cdh1:18080/
        </a>
        访问 spark master 的 web 界面。
       </p>
       <p>
        <img src="http://dataunion.org/wp-content/uploads/2015/02/spark-master-web-ui.jpg"/>
       </p>
       <h3 id="articleHeader6">
        使用 spark 自带脚本管理集群
       </h3>
       <p>
        另外，你也可以使用 spark 自带的脚本来启动和停止，这些脚本在
        <code>
         /usr/lib/spark/sbin
        </code>
        目录下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e7f807218935" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ ls /usr/lib/spark/sbin
slaves.sh        spark-daemons.sh  start-master.sh  stop-all.sh
spark-config.sh  spark-executor    start-slave.sh   stop-master.sh
spark-daemon.sh  start-all.sh      start-slaves.sh  stop-slaves.sh
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e7f807218935-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e7f807218935-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e7f807218935-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e7f807218935-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e7f807218935-5">
               5
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e7f807218935-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                ls
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                sbin
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e7f807218935-2">
               <span class="crayon-v">
                slaves
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                daemons
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                master
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                stop
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                all
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e7f807218935-3">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                config
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                executor
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                slave
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                stop
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                master
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e7f807218935-4">
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                daemon
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                all
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                slaves
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sh
               </span>
               <span class="crayon-v">
                stop
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                slaves
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                sh
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e7f807218935-5">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0029 seconds] -->
       <p>
        这时候，还需要修改 /etc/spark/conf/slaves 文件：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e85056042465" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-comment"&gt;# A Spark Worker will be started on each of the machines listed below.&lt;/span&gt;
&lt;span class="hljs-title"&gt;cdh1&lt;/span&gt;
cdh2
cdh3
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e85056042465-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e85056042465-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e85056042465-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e85056042465-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e85056042465-5">
               5
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e85056042465-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # A Spark Worker will be started on each of the machines listed below.&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e85056042465-2">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                cdh1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e85056042465-3">
               <span class="crayon-e">
                cdh2
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e85056042465-4">
               <span class="crayon-i">
                cdh3
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e85056042465-5">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0011 seconds] -->
       <p>
        然后，你也可以通过下面脚本启动 master：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e8b648849182" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ &lt;span class="hljs-built_in"&gt;cd&lt;/span&gt; /usr/lib/spark/sbin
$ ./start-master.sh
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e8b648849182-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e8b648849182-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13e8b648849182-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e8b648849182-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                cd
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                sbin
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e8b648849182-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                master
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                sh
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13e8b648849182-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0014 seconds] -->
       <p>
        通过下面命令启动所有节点上的 worker：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e90052822024" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ ./start-slaves.sh
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e90052822024-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e90052822024-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e90052822024-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                start
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                slaves
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                sh
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e90052822024-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0006 seconds] -->
       <p>
        当然，你也可以通过下面方式启动：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e96877749252" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ ./bin/spark-class org.apache.spark.deploy.worker.Worker spark://cdh1:&lt;span class="hljs-number"&gt;18080&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e96877749252-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e96877749252-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e96877749252-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                deploy
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                worker
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Worker
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-c">
                //cdh1:&lt;span class="hljs-number"&gt;18080&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e96877749252-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0011 seconds] -->
       <p>
       </p>
       <h1 id="articleHeader7">
        4. 测试
       </h1>
       <h2 id="articleHeader8">
        4.1 运行测试例子
       </h2>
       <p>
        你可以在官方站点查看官方的
        <a href="http://spark.apache.org/examples.html" rel="nofollow" target="_blank">
         例子
        </a>
        。 除此之外，Spark 在发布包的 examples 的文件夹中包含了几个例子(
        <a href="https://github.com/apache/spark/tree/master/examples/src/main/scala/org/apache/spark/examples" rel="nofollow" target="_blank">
         Scala
        </a>
        、
        <a href="https://github.com/apache/spark/tree/master/examples/src/main/java/org/apache/spark/examples" rel="nofollow" target="_blank">
         Java
        </a>
        、Python)。运行 Java 和 Scala 例子时你可以传递类名给 Spark 的 bin/run-example脚本， 例如：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13e9c931411412" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ ./bin/run-example SparkPi &lt;span class="hljs-number"&gt;10&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13e9c931411412-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13e9c931411412-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13e9c931411412-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                run
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                example
               </span>
               <span class="crayon-v">
                SparkPi
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13e9c931411412-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0011 seconds] -->
       <p>
        通过 Python API 来运行交互模式：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ea2034057391" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-comment"&gt;# 使用2个 Worker 线程本地化运行 Spark（理想情况下，该值应该根据运行机器的 CPU 核数设定）&lt;/span&gt;
$ ./bin/pyspark --master local[&lt;span class="hljs-number"&gt;2&lt;/span&gt;]

Python &lt;span class="hljs-number"&gt;2.6&lt;/span&gt;.&lt;span class="hljs-number"&gt;6&lt;/span&gt; (r266:&lt;span class="hljs-number"&gt;84292&lt;/span&gt;, Nov &lt;span class="hljs-number"&gt;22&lt;/span&gt; &lt;span class="hljs-number"&gt;2013&lt;/span&gt;, &lt;span class="hljs-number"&gt;12&lt;/span&gt;:&lt;span class="hljs-number"&gt;16&lt;/span&gt;:&lt;span class="hljs-number"&gt;22&lt;/span&gt;)
[GCC &lt;span class="hljs-number"&gt;4.4&lt;/span&gt;.&lt;span class="hljs-number"&gt;7&lt;/span&gt; &lt;span class="hljs-number"&gt;20120313&lt;/span&gt; (Red Hat &lt;span class="hljs-number"&gt;4.4&lt;/span&gt;.&lt;span class="hljs-number"&gt;7&lt;/span&gt;-&lt;span class="hljs-number"&gt;4&lt;/span&gt;)] on linux2
Type &lt;span class="hljs-string"&gt;"help"&lt;/span&gt;, &lt;span class="hljs-string"&gt;"copyright"&lt;/span&gt;, &lt;span class="hljs-string"&gt;"credits"&lt;/span&gt; or &lt;span class="hljs-string"&gt;"license"&lt;/span&gt; &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; more information.

Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  `_/
   /__ / .__/\_,_/_/ /_/\_\   version &lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;
      /_/

Using Python version &lt;span class="hljs-number"&gt;2.6&lt;/span&gt;.&lt;span class="hljs-number"&gt;6&lt;/span&gt; (r266:&lt;span class="hljs-number"&gt;84292&lt;/span&gt;, Nov &lt;span class="hljs-number"&gt;22&lt;/span&gt; &lt;span class="hljs-number"&gt;2013&lt;/span&gt; &lt;span class="hljs-number"&gt;12&lt;/span&gt;:&lt;span class="hljs-number"&gt;16&lt;/span&gt;:&lt;span class="hljs-number"&gt;22&lt;/span&gt;)
SparkContext available as sc.
&amp;gt;&amp;gt;&amp;gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ea2034057391-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ea2034057391-18">
               18
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # 使用2个 Worker 线程本地化运行 Spark（理想情况下，该值应该根据运行机器的 CPU 核数设定）&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                pyspark
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                local
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                ]
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-4">
               <span class="crayon-v">
                Python
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2.6
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                r266
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                84292
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Nov
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                22
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2013
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                12
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                16
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                22
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-5">
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-v">
                GCC
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                4.4
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                7
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                20120313
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-e">
                Red
               </span>
               <span class="crayon-v">
                Hat
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                4.4
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                7
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                on
               </span>
               <span class="crayon-e">
                linux2
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-6">
               <span class="crayon-v">
                Type
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "help"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "copyright"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "credits"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                or
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "license"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-st">
                for
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                more
               </span>
               <span class="crayon-v">
                information
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-7">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-8">
               <span class="crayon-e">
                Welcome
               </span>
               <span class="crayon-st">
                to
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                ____
               </span>
               <span class="crayon-v">
                __
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                __
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                __
               </span>
               <span class="crayon-e">
                ___
               </span>
               <span class="crayon-v">
                _____
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                _
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                _
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                _
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                __
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                __
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                __
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-14">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-15">
               <span class="crayon-e">
                Using
               </span>
               <span class="crayon-e">
                Python
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2.6
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                r266
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                84292
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Nov
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                22
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2013
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                12
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                16
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                22
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-16">
               <span class="crayon-e">
                SparkContext
               </span>
               <span class="crayon-e">
                available
               </span>
               <span class="crayon-st">
                as
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sc
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ea2034057391-17">
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ea2034057391-18">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0165 seconds] -->
       <p>
        你也可以运行 Python 编写的应用：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13eaa593245139" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ mkdir -p /usr/lib/spark/examples/python
$ tar zxvf /usr/lib/spark/lib/python.tar.gz -C /usr/lib/spark/examples/python

$ ./bin/spark-submit examples/python/pi.py &lt;span class="hljs-number"&gt;10&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13eaa593245139-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eaa593245139-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eaa593245139-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eaa593245139-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eaa593245139-5">
               5
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13eaa593245139-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                mkdir
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                python
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eaa593245139-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                tar
               </span>
               <span class="crayon-v">
                zxvf
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                python
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                tar
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                gz
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                C
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                python
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eaa593245139-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eaa593245139-4">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                submit
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                python
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                pi
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                py
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eaa593245139-5">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0030 seconds] -->
       <p>
        另外，你还可以运行 spark shell 的交互模式：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13eb0847318504" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-comment"&gt;# 使用2个 Worker 线程本地化运行 Spark（理想情况下，该值应该根据运行机器的 CPU 核数设定）&lt;/span&gt;
$ ./bin/spark-shell --master local[&lt;span class="hljs-number"&gt;2&lt;/span&gt;]

Welcome to
      ____              __
     / __/__  ___ _____/ /__
    _\ \/ _ \/ _ `/ __/  `_/
   /___/ .__/\_,_/_/ /_/\_\   version &lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;
      /_/

Using Scala version &lt;span class="hljs-number"&gt;2.10&lt;/span&gt;.&lt;span class="hljs-number"&gt;4&lt;/span&gt; (Java HotSpot(TM) &lt;span class="hljs-number"&gt;64&lt;/span&gt;-Bit Server VM, Java &lt;span class="hljs-number"&gt;1.7&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;_71)
Type &lt;span class="hljs-keyword"&gt;in&lt;/span&gt; expressions to have them evaluated.
Type :&lt;span class="hljs-built_in"&gt;help&lt;/span&gt; &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; more information.

Spark context available as sc.

scala&amp;gt; val lines = sc.textFile(&lt;span class="hljs-string"&gt;"data.txt"&lt;/span&gt;)
scala&amp;gt; val lineLengths = lines.map(s =&amp;gt; s.length)
scala&amp;gt; val totalLength = lineLengths.reduce((a, b) =&amp;gt; a + b)
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb0847318504-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb0847318504-21">
               21
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                # 使用2个 Worker 线程本地化运行 Spark（理想情况下，该值应该根据运行机器的 CPU 核数设定）&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                shell
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                local
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                ]
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-4">
               <span class="crayon-e">
                Welcome
               </span>
               <span class="crayon-st">
                to
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                ____
               </span>
               <span class="crayon-v">
                __
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                __
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-e">
                __
               </span>
               <span class="crayon-e">
                ___
               </span>
               <span class="crayon-v">
                _____
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                _
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                _
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                _
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                __
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                ___
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                __
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                \
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-10">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-11">
               <span class="crayon-e">
                Using
               </span>
               <span class="crayon-e">
                Scala
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2.10
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-e">
                Java
               </span>
               <span class="crayon-e">
                HotSpot
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                TM
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                64
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                Bit
               </span>
               <span class="crayon-e">
                Server
               </span>
               <span class="crayon-v">
                VM
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Java
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.7
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                _71
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-12">
               <span class="crayon-v">
                Type
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-st">
                in
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                expressions
               </span>
               <span class="crayon-st">
                to
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                have
               </span>
               <span class="crayon-e">
                them
               </span>
               <span class="crayon-v">
                evaluated
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-13">
               <span class="crayon-v">
                Type
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                help
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-st">
                for
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                more
               </span>
               <span class="crayon-v">
                information
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-14">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-15">
               <span class="crayon-e">
                Spark
               </span>
               <span class="crayon-e">
                context
               </span>
               <span class="crayon-e">
                available
               </span>
               <span class="crayon-st">
                as
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sc
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-16">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-17">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                lines
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                textFile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "data.txt"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-18">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                lineLengths
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                lines
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                map
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                s
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                s
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                length
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-19">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                totalLength
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                lineLengths
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                reduce
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                a
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                b
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                a
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                b
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb0847318504-20">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb0847318504-21">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0116 seconds] -->
       <p>
        上面是一个 RDD 的示例程序，从一个外部文件创建了一个基本的 RDD对象。如果想运行这段程序，请确保 data.txt 文件在当前目录中存在。
       </p>
       <h2 id="articleHeader9">
        4.2 在集群上运行
       </h2>
       <p>
        Spark 目前支持三种集群管理模式：
       </p>
       <ul>
        <li>
         <a href="https://spark.apache.org/docs/latest/spark-standalone.html" rel="nofollow" target="_blank">
          Standalone
         </a>
         – Spark自带的简单的集群管理器， 很容易的建立Spark集群
        </li>
        <li>
         <a href="https://spark.apache.org/docs/latest/running-on-mesos.html" rel="nofollow" target="_blank">
          Apache Mesos
         </a>
         – 一个通用的集群管理器，可以运行Hadoop MapReduce和其它服务应用
        </li>
        <li>
         <a href="https://spark.apache.org/docs/latest/running-on-yarn.html" rel="nofollow" target="_blank">
          Hadoop YARN
         </a>
         – Hadoop 2提供的管理器
        </li>
       </ul>
       <p>
        另外 Spark 的
        <a href="https://spark.apache.org/docs/latest/ec2-scripts.html" rel="nofollow" target="_blank">
         EC2 launch scripts
        </a>
        可以帮助你容易地在Amazon EC2上启动standalone cluster.
       </p>
       <p>
        &gt;
       </p>
       <blockquote>
        <ul>
         <li>
          在集群不是特别大，并且没有 mapReduce 和 Spark 同时运行的需求的情况下，用 Standalon e模式效率最高。
         </li>
         <li>
          Spark可以在应用间（通过集群管理器）和应用中（如果一个 SparkContext 中有多项计算任务）进行资源调度。
         </li>
        </ul>
       </blockquote>
       <h3 id="articleHeader10">
        Standalone 模式
       </h3>
       <p>
        该模式下只需在一个节点上安装 spark 的相关组件即可。
       </p>
       <p>
        你可以通过 spark-shel l 运行下面的 wordcount 例子，因为 hdfs 上的输入和输出文件都涉及到用户的访问权限，故这里使用 hive 用户来启动 spark-shell：
       </p>
       <p>
        读取 hdfs 的一个例子：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13eb8149446708" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ &lt;span class="hljs-built_in"&gt;echo&lt;/span&gt; &lt;span class="hljs-string"&gt;"hello world"&lt;/span&gt; &amp;gt;test.txt
$ hadoop fs -put test.txt /tmp

$ spark-shell
scala&amp;gt; val file = sc.textFile(&lt;span class="hljs-string"&gt;"hdfs://cdh1:8020/tmp/test.txt"&lt;/span&gt;)
scala&amp;gt; file.count()
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13eb8149446708-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb8149446708-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb8149446708-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb8149446708-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb8149446708-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eb8149446708-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13eb8149446708-7">
               7
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13eb8149446708-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                echo
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "hello world"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                test
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                txt
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb8149446708-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hadoop
               </span>
               <span class="crayon-v">
                fs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                put
               </span>
               <span class="crayon-v">
                test
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                txt
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                tmp
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb8149446708-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb8149446708-4">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                shell
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb8149446708-5">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                file
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                textFile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "hdfs://cdh1:8020/tmp/test.txt"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eb8149446708-6">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                file
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                count
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13eb8149446708-7">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0032 seconds] -->
       <p>
        如果出现下面异常，可能是因为
        <strong>
         系统可用内存不够
        </strong>
        ：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ebe397367620" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          /usr/lib/spark/bin/spark-shell: line &lt;span class="hljs-number"&gt;48&lt;/span&gt;:  &lt;span class="hljs-number"&gt;5385&lt;/span&gt; Killed                  &lt;span class="hljs-string"&gt;"&lt;span class="hljs-variable"&gt;$FWDIR&lt;/span&gt;"&lt;/span&gt;/bin/spark-submit --class org.apache.spark.repl.Main &lt;span class="hljs-string"&gt;"&lt;span class="hljs-variable"&gt;${SUBMISSION_OPTS[@]}&lt;/span&gt;"&lt;/span&gt; spark-shell &lt;span class="hljs-string"&gt;"&lt;span class="hljs-variable"&gt;${APPLICATION_OPTS[@]}&lt;/span&gt;"&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ebe397367620-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ebe397367620-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ebe397367620-1">
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                shell
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                48
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                5385
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Killed
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "&lt;span class="
               </span>
               <span class="crayon-v">
                hljs
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                variable
               </span>
               <span class="crayon-s">
                "&gt;$FWDIR&lt;/span&gt;"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                submit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                repl
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Main
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "&lt;span class="
               </span>
               <span class="crayon-v">
                hljs
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                variable
               </span>
               <span class="crayon-s">
                "&gt;${SUBMISSION_OPTS[@]}&lt;/span&gt;"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                shell
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "&lt;span class="
               </span>
               <span class="crayon-v">
                hljs
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                variable
               </span>
               <span class="crayon-s">
                "&gt;${APPLICATION_OPTS[@]}&lt;/span&gt;"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ebe397367620-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0043 seconds] -->
       <p>
        运行过程中，还可能会出现下面的错误：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ec4181036473" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          14/10/24 14:51:40 WARN hdfs.BlockReaderLocal: The short-circuit local reads feature cannot be used because libhadoop cannot be loaded.
14/10/24 14:51:40 ERROR lzo.GPLNativeCodeLoader: Could not &lt;span class="hljs-operator"&gt;&lt;span class="hljs-keyword"&gt;load&lt;/span&gt; native gpl library
java.lang.UnsatisfiedLinkError: &lt;span class="hljs-keyword"&gt;no&lt;/span&gt; gplcompression &lt;span class="hljs-keyword"&gt;in&lt;/span&gt; java.library.path
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; java.lang.ClassLoader.loadLibrary(ClassLoader.java:&lt;span class="hljs-number"&gt;1738&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; java.lang.Runtime.loadLibrary0(Runtime.java:&lt;span class="hljs-number"&gt;823&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; java.lang.System.loadLibrary(System.java:&lt;span class="hljs-number"&gt;1028&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; com.hadoop.compression.lzo.GPLNativeCodeLoader.&amp;lt;clinit&amp;gt;(GPLNativeCodeLoader.java:&lt;span class="hljs-number"&gt;32&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; com.hadoop.compression.lzo.LzoCodec.&amp;lt;clinit&amp;gt;(LzoCodec.java:&lt;span class="hljs-number"&gt;71&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; java.lang.Class.forName0(Native Method)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; java.lang.Class.forName(Class.java:&lt;span class="hljs-number"&gt;249&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:&lt;span class="hljs-number"&gt;1836&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:&lt;span class="hljs-number"&gt;1801&lt;/span&gt;)
    &lt;span class="hljs-keyword"&gt;at&lt;/span&gt; org.apache.hadoop.io.&lt;span class="hljs-keyword"&gt;compress&lt;/span&gt;.CompressionCodecFactory.getCodecClasses(CompressionCodecFactory.java:&lt;span class="hljs-number"&gt;128&lt;/span&gt;)
&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ec4181036473-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ec4181036473-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ec4181036473-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ec4181036473-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ec4181036473-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ec4181036473-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ec4181036473-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ec4181036473-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ec4181036473-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ec4181036473-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ec4181036473-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ec4181036473-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ec4181036473-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ec4181036473-14">
               14
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ec4181036473-1">
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                24
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                51
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                40
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                WARN
               </span>
               <span class="crayon-v">
                hdfs
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                BlockReaderLocal
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                The
               </span>
               <span class="crayon-t">
                short
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                circuit
               </span>
               <span class="crayon-e">
                local
               </span>
               <span class="crayon-e">
                reads
               </span>
               <span class="crayon-e">
                feature
               </span>
               <span class="crayon-e">
                cannot
               </span>
               <span class="crayon-e">
                be
               </span>
               <span class="crayon-e">
                used
               </span>
               <span class="crayon-e">
                because
               </span>
               <span class="crayon-e">
                libhadoop
               </span>
               <span class="crayon-e">
                cannot
               </span>
               <span class="crayon-e">
                be
               </span>
               <span class="crayon-v">
                loaded
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ec4181036473-2">
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-cn">
                24
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                51
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                40
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                ERROR
               </span>
               <span class="crayon-v">
                lzo
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                GPLNativeCodeLoader
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Could
               </span>
               <span class="crayon-st">
                not
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-operator"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                load
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                native
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                gpl
               </span>
               <span class="crayon-e">
                library
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ec4181036473-3">
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                UnsatisfiedLinkError
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                no
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                gplcompression
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-st">
                in
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                library
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                path
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ec4181036473-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadLibrary
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1738
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ec4181036473-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Runtime
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadLibrary0
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                Runtime
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                823
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ec4181036473-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadLibrary
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1028
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ec4181036473-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                com
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                compression
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lzo
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                GPLNativeCodeLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                clinit
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                GPLNativeCodeLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                32
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ec4181036473-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                com
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                compression
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lzo
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                LzoCodec
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                clinit
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                LzoCodec
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                71
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ec4181036473-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-t">
                Class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                forName0
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-m">
                Native
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Method
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ec4181036473-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-t">
                Class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                forName
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-t">
                Class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                249
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ec4181036473-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Configuration
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getClassByNameOrNull
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                Configuration
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1836
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ec4181036473-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                Configuration
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getClassByName
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                Configuration
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1801
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ec4181036473-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                at
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                io
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                compress
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                CompressionCodecFactory
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getCodecClasses
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                CompressionCodecFactory
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                128
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ec4181036473-14">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0173 seconds] -->
       <p>
        该异常的解决方法可以参考
        <a href="http://blog.csdn.net/pelick/article/details/11599391" rel="nofollow" target="_blank">
         Spark连接Hadoop读取HDFS问题小结
        </a>
        这篇文章。
       </p>
       <p>
        解决方法：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ecc248609362" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          cp /usr/lib/hadoop/lib/native/libgplcompression.so &lt;span class="hljs-variable"&gt;$JAVA_HOME&lt;/span&gt;/jre/lib/amd64/
cp /usr/lib/hadoop/lib/native/libhadoop.so &lt;span class="hljs-variable"&gt;$JAVA_HOME&lt;/span&gt;/jre/lib/amd64/
cp /usr/lib/hadoop/lib/native/libsnappy.so &lt;span class="hljs-variable"&gt;$JAVA_HOME&lt;/span&gt;/jre/lib/amd64/
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ecc248609362-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ecc248609362-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ecc248609362-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ecc248609362-4">
               4
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ecc248609362-1">
               <span class="crayon-v">
                cp
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-m">
                native
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                libgplcompression
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                so
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                JAVA_HOME
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                jre
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                amd64
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ecc248609362-2">
               <span class="crayon-v">
                cp
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-m">
                native
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                libhadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                so
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                JAVA_HOME
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                jre
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                amd64
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ecc248609362-3">
               <span class="crayon-v">
                cp
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-m">
                native
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                libsnappy
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                so
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                JAVA_HOME
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                jre
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                amd64
               </span>
               <span class="crayon-o">
                /
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ecc248609362-4">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0039 seconds] -->
       <p>
        更复杂的一个例子，运行 mapreduce 统计单词数：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ed2086454506" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ spark-shell
scala&amp;gt; val file = sc.textFile(&lt;span class="hljs-string"&gt;"hdfs://cdh1:8020/tmp/test.txt"&lt;/span&gt;)
scala&amp;gt; val counts = file.flatMap(line =&amp;gt; line.split(&lt;span class="hljs-string"&gt;" "&lt;/span&gt;)).map(word =&amp;gt; (word, &lt;span class="hljs-number"&gt;1&lt;/span&gt;)).reduceByKey(_ + _)
scala&amp;gt; counts.saveAsTextFile(&lt;span class="hljs-string"&gt;"hdfs://cdh1:8020/tmp/output"&lt;/span&gt;)
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ed2086454506-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ed2086454506-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ed2086454506-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ed2086454506-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ed2086454506-5">
               5
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ed2086454506-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                shell
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ed2086454506-2">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                file
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                textFile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "hdfs://cdh1:8020/tmp/test.txt"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ed2086454506-3">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                counts
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                file
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                flatMap
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                split
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                " "
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                map
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-t">
                word
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-t">
                word
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                reduceByKey
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ed2086454506-4">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                counts
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                saveAsTextFile
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "hdfs://cdh1:8020/tmp/output"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ed2086454506-5">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0045 seconds] -->
       <p>
        运行完成之后，你可以查看
        <code>
         hdfs://cdh1:8020/tmp/output
        </code>
        目录下的文件内容。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ed8078426352" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ hadoop fs -cat /tmp/output/part-&lt;span class="hljs-number"&gt;00000&lt;/span&gt;
(hello,&lt;span class="hljs-number"&gt;1&lt;/span&gt;)
(world,&lt;span class="hljs-number"&gt;1&lt;/span&gt;)
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ed8078426352-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ed8078426352-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ed8078426352-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ed8078426352-4">
               4
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ed8078426352-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hadoop
               </span>
               <span class="crayon-v">
                fs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                cat
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                tmp
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                output
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                part
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                00000
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ed8078426352-2">
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                hello
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ed8078426352-3">
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                world
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ed8078426352-4">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0022 seconds] -->
       <p>
        另外，spark-shell 后面还可以加上其他参数，例如：连接指定的 master、运行核数等等：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ede404011217" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ spark-shell --master spark://cdh1:&lt;span class="hljs-number"&gt;7077&lt;/span&gt; --cores &lt;span class="hljs-number"&gt;2&lt;/span&gt;
scala&amp;gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ede404011217-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ede404011217-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ede404011217-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ede404011217-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                shell
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-c">
                //cdh1:&lt;span class="hljs-number"&gt;7077&lt;/span&gt; --cores &lt;span class="hljs-number"&gt;2&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ede404011217-2">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ede404011217-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0009 seconds] -->
       <p>
        也可以增加 jar：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ee3830844951" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ spark-shell --master spark://cdh1:&lt;span class="hljs-number"&gt;7077&lt;/span&gt; --cores &lt;span class="hljs-number"&gt;2&lt;/span&gt; --jars code.jar
scala&amp;gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ee3830844951-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ee3830844951-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13ee3830844951-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ee3830844951-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                shell
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-c">
                //cdh1:&lt;span class="hljs-number"&gt;7077&lt;/span&gt; --cores &lt;span class="hljs-number"&gt;2&lt;/span&gt; --jars code.jar
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ee3830844951-2">
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13ee3830844951-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0009 seconds] -->
       <p>
        运行
        <code>
         spark-shell --help
        </code>
        可以查看更多的参数。
       </p>
       <p>
        另外，也可以使用 spark-submit 以 Standalone 模式运行 SparkPi 程序：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ee9530718686" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ spark-submit --class org.apache.spark.examples.SparkPi --deploy-mode client --master spark://cdh1:&lt;span class="hljs-number"&gt;7077&lt;/span&gt; /usr/lib/spark/lib/spark-examples-&lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;-hadoop2.&lt;span class="hljs-number"&gt;5.0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.jar &lt;span class="hljs-number"&gt;10&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ee9530718686-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ee9530718686-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ee9530718686-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                submit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SparkPi
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                deploy
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                mode
               </span>
               <span class="crayon-v">
                client
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-c">
                //cdh1:&lt;span class="hljs-number"&gt;7077&lt;/span&gt; /usr/lib/spark/lib/spark-examples-&lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;-hadoop2.&lt;span class="hljs-number"&gt;5.0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.jar &lt;span class="hljs-number"&gt;10&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ee9530718686-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0018 seconds] -->
       <p>
       </p>
       <h3 id="articleHeader11">
        Spark on Yarn
       </h3>
       <p>
        以 YARN 客户端方式运行 SparkPi 程序：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13eef213235411" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ spark-submit --class org.apache.spark.examples.SparkPi --deploy-mode client --master yarn /usr/lib/spark/lib/spark-examples-&lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;-hadoop2.&lt;span class="hljs-number"&gt;5.0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.jar &lt;span class="hljs-number"&gt;10&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13eef213235411-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13eef213235411-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13eef213235411-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                submit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SparkPi
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                deploy
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                mode
               </span>
               <span class="crayon-v">
                client
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                yarn
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                hadoop2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                5.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                jar
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13eef213235411-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0043 seconds] -->
       <p>
        以 YARN 集群方式运行 SparkPi 程序：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13ef5661314094" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ spark-submit --class org.apache.spark.examples.SparkPi --deploy-mode cluster --master yarn usr/lib/spark/lib/spark-examples-&lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;-hadoop2.&lt;span class="hljs-number"&gt;5.0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;.jar &lt;span class="hljs-number"&gt;10&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13ef5661314094-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13ef5661314094-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13ef5661314094-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                submit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SparkPi
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-v">
                deploy
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                mode
               </span>
               <span class="crayon-v">
                cluster
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-e">
                yarn
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                hadoop2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                5.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                jar
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13ef5661314094-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0043 seconds] -->
       <p>
        运行在 YARN 集群之上的时候，可以手动把 spark-assembly 相关的 jar 包拷贝到 hdfs 上去，然后设置
        <code>
         SPARK_JAR
        </code>
        环境变量：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13efb245967023" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ hdfs dfs -mkdir -p /user/spark/share/lib
$ hdfs dfs -put &lt;span class="hljs-variable"&gt;$SPARK_HOME&lt;/span&gt;/lib/spark-assembly.jar  /user/spark/share/lib/spark-assembly.jar

$ SPARK_JAR=hdfs://&amp;lt;nn&amp;gt;:&amp;lt;port&amp;gt;/user/spark/share/lib/spark-assembly.jar
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13efb245967023-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13efb245967023-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13efb245967023-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13efb245967023-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13efb245967023-5">
               5
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13efb245967023-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hdfs
               </span>
               <span class="crayon-v">
                dfs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                mkdir
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                share
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                lib
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13efb245967023-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                hdfs
               </span>
               <span class="crayon-v">
                dfs
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                put
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                SPARK_HOME
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                assembly
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                jar
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                user
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                share
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                assembly
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-i">
                jar
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13efb245967023-3">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13efb245967023-4">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                SPARK_JAR
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                hdfs
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-c">
                //&amp;lt;nn&amp;gt;:&amp;lt;port&amp;gt;/user/spark/share/lib/spark-assembly.jar
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13efb245967023-5">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0027 seconds] -->
       <p>
       </p>
       <h1 id="articleHeader12">
        5. Spark-SQL
       </h1>
       <p>
        Spark 安装包中包括了 Spark-SQL ，运行 spark-sql 命令，在 cdh5.2 中会出现下面异常：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13f01878638209" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ &lt;span class="hljs-built_in"&gt;cd&lt;/span&gt; /usr/lib/spark/bin
$ ./spark-sql
java.lang.ClassNotFoundException: org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver
    at java.net.URLClassLoader&lt;span class="hljs-variable"&gt;$1&lt;/span&gt;.run(URLClassLoader.java:&lt;span class="hljs-number"&gt;202&lt;/span&gt;)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:&lt;span class="hljs-number"&gt;190&lt;/span&gt;)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:&lt;span class="hljs-number"&gt;306&lt;/span&gt;)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:&lt;span class="hljs-number"&gt;247&lt;/span&gt;)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:&lt;span class="hljs-number"&gt;247&lt;/span&gt;)
    at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:&lt;span class="hljs-number"&gt;319&lt;/span&gt;)
    at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:&lt;span class="hljs-number"&gt;75&lt;/span&gt;)
    at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

Failed to load Spark SQL CLI main class org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.
You need to build Spark with -Phive.
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f01878638209-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f01878638209-17">
               17
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-built_in"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                cd
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                bin
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                sql
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-3">
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ClassNotFoundException
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                sql
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hive
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                thriftserver
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                SparkSQLCLIDriver
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-4">
               <span class="crayon-e">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                net
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                run
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                202
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                security
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                AccessController
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                doPrivileged
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-m">
                Native
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Method
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                net
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                findClass
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                190
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadClass
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                306
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadClass
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                247
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-t">
                Class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                forName0
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-m">
                Native
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Method
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-t">
                Class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                forName
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-t">
                Class
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                247
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                deploy
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SparkSubmit
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                launch
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                SparkSubmit
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                319
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                deploy
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SparkSubmit
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                SparkSubmit
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                75
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                deploy
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SparkSubmit
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                SparkSubmit
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-14">
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-15">
               <span class="crayon-e">
                Failed
               </span>
               <span class="crayon-st">
                to
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                load
               </span>
               <span class="crayon-e">
                Spark
               </span>
               <span class="crayon-e">
                SQL
               </span>
               <span class="crayon-e">
                CLI
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                sql
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hive
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                thriftserver
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SparkSQLCLIDriver
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f01878638209-16">
               <span class="crayon-e">
                You
               </span>
               <span class="crayon-e">
                need
               </span>
               <span class="crayon-st">
                to
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                build
               </span>
               <span class="crayon-e">
                Spark
               </span>
               <span class="crayon-v">
                with
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                Phive
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f01878638209-17">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0114 seconds] -->
       <p>
        在 cdh5.3 中会出现下面异常：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13f08121309097" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-constant"&gt;Caused&lt;/span&gt; &lt;span class="hljs-symbol"&gt;by:&lt;/span&gt; java.lang.&lt;span class="hljs-constant"&gt;ClassNotFoundException&lt;/span&gt;&lt;span class="hljs-symbol"&gt;:&lt;/span&gt; org.apache.hadoop.hive.cli.&lt;span class="hljs-constant"&gt;CliDriver&lt;/span&gt;
  at java.net.&lt;span class="hljs-constant"&gt;URLClassLoader&lt;/span&gt;&lt;span class="hljs-variable"&gt;$1&lt;/span&gt;.run(&lt;span class="hljs-constant"&gt;URLClassLoader&lt;/span&gt;.&lt;span class="hljs-symbol"&gt;java:&lt;/span&gt;&lt;span class="hljs-number"&gt;366&lt;/span&gt;)
  at java.net.&lt;span class="hljs-constant"&gt;URLClassLoader&lt;/span&gt;&lt;span class="hljs-variable"&gt;$1&lt;/span&gt;.run(&lt;span class="hljs-constant"&gt;URLClassLoader&lt;/span&gt;.&lt;span class="hljs-symbol"&gt;java:&lt;/span&gt;&lt;span class="hljs-number"&gt;355&lt;/span&gt;)
  at java.security.&lt;span class="hljs-constant"&gt;AccessController&lt;/span&gt;.doPrivileged(&lt;span class="hljs-constant"&gt;Native&lt;/span&gt; &lt;span class="hljs-constant"&gt;Method&lt;/span&gt;)
  at java.net.&lt;span class="hljs-constant"&gt;URLClassLoader&lt;/span&gt;.findClass(&lt;span class="hljs-constant"&gt;URLClassLoader&lt;/span&gt;.&lt;span class="hljs-symbol"&gt;java:&lt;/span&gt;&lt;span class="hljs-number"&gt;354&lt;/span&gt;)
  at java.lang.&lt;span class="hljs-constant"&gt;ClassLoader&lt;/span&gt;.loadClass(&lt;span class="hljs-constant"&gt;ClassLoader&lt;/span&gt;.&lt;span class="hljs-symbol"&gt;java:&lt;/span&gt;&lt;span class="hljs-number"&gt;425&lt;/span&gt;)
  at sun.misc.&lt;span class="hljs-constant"&gt;Launcher&lt;/span&gt;&lt;span class="hljs-variable"&gt;$AppClassLoader&lt;/span&gt;.loadClass(&lt;span class="hljs-constant"&gt;Launcher&lt;/span&gt;.&lt;span class="hljs-symbol"&gt;java:&lt;/span&gt;&lt;span class="hljs-number"&gt;308&lt;/span&gt;)
  at java.lang.&lt;span class="hljs-constant"&gt;ClassLoader&lt;/span&gt;.loadClass(&lt;span class="hljs-constant"&gt;ClassLoader&lt;/span&gt;.&lt;span class="hljs-symbol"&gt;java:&lt;/span&gt;&lt;span class="hljs-number"&gt;358&lt;/span&gt;)
  ... &lt;span class="hljs-number"&gt;18&lt;/span&gt; more
 ```

从上可以知道  &lt;span class="hljs-constant"&gt;Spark&lt;/span&gt;-&lt;span class="hljs-constant"&gt;SQL&lt;/span&gt; 编译时没有集成 &lt;span class="hljs-constant"&gt;Hive&lt;/span&gt;，故需要重新编译 spark 源代码。

&lt;span class="hljs-comment"&gt;### 编译 Spark-SQL&lt;/span&gt;

下载代码：

```bash
&lt;span class="hljs-variable"&gt;$ &lt;/span&gt;git clone git&lt;span class="hljs-variable"&gt;@github&lt;/span&gt;.&lt;span class="hljs-symbol"&gt;com:&lt;/span&gt;cloudera/spark.git
&lt;span class="hljs-variable"&gt;$ &lt;/span&gt;cd spark
&lt;span class="hljs-variable"&gt;$ &lt;/span&gt;git checkout -b origin/cdh5-&lt;span class="hljs-number"&gt;1.2&lt;/span&gt;.&lt;span class="hljs-number"&gt;0_5&lt;/span&gt;.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f08121309097-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f08121309097-22">
               22
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                Caused
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                by
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                ClassNotFoundException
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                hive
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                cli
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                CliDriver
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                net
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                run
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                366
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                net
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                run
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                355
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                security
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                AccessController
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                doPrivileged
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-m">
                Native
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                Method
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                net
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                findClass
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                URLClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                354
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadClass
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                425
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                sun
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                misc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                Launcher
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                AppClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadClass
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                Launcher
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                308
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                at
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                lang
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                loadClass
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                ClassLoader
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                358
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                18
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                more
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-sy">
                `
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-11">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-12">
               从上可以知道
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                Spark
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                SQL
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               编译时没有集成
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-constant"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                Hive
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               ，故需要重新编译
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                spark
               </span>
               <span class="crayon-h">
               </span>
               源代码。
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-13">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-14">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-p">
                ### 编译 Spark-SQL&lt;/span&gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-15">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-16">
               下载代码：
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-17">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-18">
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-v">
                bash
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-19">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-e">
                git
               </span>
               <span class="crayon-r">
                clone
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                git
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-v">
                github
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-symbol"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                com
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                cloudera
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                git
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-20">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-e">
                cd
               </span>
               <span class="crayon-v">
                spark
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f08121309097-21">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-variable"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-e">
                git
               </span>
               <span class="crayon-v">
                checkout
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                b
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                origin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                1.2
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0_5
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f08121309097-22">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0225 seconds] -->
       <p>
        编译代码，集成 yarn 和 hive，有三种方式：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13f10821136109" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ sbt/sbt -Dhadoop.version=&lt;span class="hljs-number"&gt;2.5&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt; -Pyarn -Phive assembly
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13f10821136109-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f10821136109-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13f10821136109-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sbt
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                sbt
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                Dhadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2.5
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                Pyarn
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                Phive
               </span>
               <span class="crayon-i">
                assembly
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f10821136109-2">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0023 seconds] -->
       <p>
        等很长很长一段时间，会提示错误。
       </p>
       <p>
        改为 maven 编译：
       </p>
       <p>
        修改根目录下的 pom.xml，添加一行
        <code>
         &lt;module&gt;sql/hive-thriftserver&lt;/module&gt;
        </code>
        ：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13f16462045741" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;modules&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;core&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;bagel&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;graphx&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;mllib&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;tools&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;streaming&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;sql/catalyst&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;sql/core&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;sql/hive&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;sql/hive-thriftserver&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt; &lt;span class="hljs-comment"&gt;&amp;lt;!--添加的一行--&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;repl&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;assembly&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;external/twitter&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;external/kafka&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;external/flume&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;external/flume-sink&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;external/zeromq&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;external/mqtt&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="hljs-tag"&gt;&amp;lt;&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;examples&lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;module&lt;/span&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="hljs-tag"&gt;&amp;lt;/&lt;span class="hljs-title"&gt;modules&lt;/span&gt;&amp;gt;&lt;/span&gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f16462045741-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f16462045741-22">
               22
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-1">
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                modules
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                core
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                bagel
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                graphx
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                mllib
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                tools
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sql
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                catalyst
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sql
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                core
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sql
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                hive
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                sql
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                hive
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                thriftserver
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-comment"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                !
               </span>
               <span class="crayon-o">
                --
               </span>
               添加的一行
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                repl
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                assembly
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                external
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                twitter
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                external
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                kafka
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                external
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                flume
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                external
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                flume
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                sink
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                external
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                zeromq
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                external
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                mqtt
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                examples
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                module
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f16462045741-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-tag"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-title"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                modules
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f16462045741-22">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0379 seconds] -->
       <p>
        然后运行：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c13f1e466615591" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          $ &lt;span class="hljs-keyword"&gt;export&lt;/span&gt; MAVEN_OPTS=&lt;span class="hljs-string"&gt;"-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"&lt;/span&gt;
$ mvn -Pyarn -Dhadoop.version=&lt;span class="hljs-number"&gt;2.5&lt;/span&gt;.&lt;span class="hljs-number"&gt;0&lt;/span&gt;-cdh5.&lt;span class="hljs-number"&gt;3.0&lt;/span&gt; -Phive -DskipTests clean package
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-57686c9c13f1e466615591-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c13f1e466615591-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-57686c9c13f1e466615591-3">
               3
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-57686c9c13f1e466615591-1">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-keyword"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-v">
                export
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                MAVEN_OPTS
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-string"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-s">
                "-Xmx2g -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512m"
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-57686c9c13f1e466615591-2">
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                mvn
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                Pyarn
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                Dhadoop
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                2.5
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                cdh5
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-e">
                span
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "hljs-number"
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-cn">
                3.0
               </span>
               <span class="crayon-o">
                &lt;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                span
               </span>
               <span class="crayon-o">
                &gt;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                Phive
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                DskipTests
               </span>
               <span class="crayon-e">
                clean
               </span>
               <span class="crayon-t">
                package
               </span>
              </div>
              <div class="crayon-line" id="crayon-57686c9c13f1e466615591-3">
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0032 seconds] -->
       <p>
        如果编译成功之后， 会在 assembly/target/scala-2.10 目录下生成：spark-assembly-1.2.0-cdh5.3.0.jar，在 examples/target/scala-2.10 目录下生成：spark-examples-1.2.0-cdh5.3.0.jar，然后将 spark-assembly-1.2.0-cdh5.3.0.jar 拷贝到 /usr/lib/spark/lib 目录，然后再来运行 spark-sql。
       </p>
       <blockquote>
        <p>
         但是，经测试 cdh5.3.0 版本中的 spark 的 sql/hive-thriftserver 模块存在编译错误，最后无法编译成功，故需要等到 cloudera 官方更新源代码或者等待下一个 cdh 版本集成 spark-sql。
        </p>
       </blockquote>
       <h1 id="articleHeader13">
        6. 总结
       </h1>
       <p>
        本文主要介绍了Spark 的安装过程以及集群运行模式，关于 Spark 的更多介绍可以参考官网或者一些
        <a href="http://colobu.com/tags/Spark/" rel="nofollow" target="_blank">
         中文翻译的文章
        </a>
        。
       </p>
       <h1 id="articleHeader14">
        7. 参考文章
       </h1>
       <ul>
        <li>
         <a href="https://spark.apache.org/docs/latest/spark-standalone.html" rel="nofollow" target="_blank">
          Spark Standalone Mode
         </a>
        </li>
        <li>
         <a href="http://blog.csdn.net/pelick/article/details/11599391" rel="nofollow" target="_blank">
          Spark连接Hadoop读取HDFS问题小结
         </a>
        </li>
       </ul>
       <p>
        文章出处：
        <a href="http://segmentfault.com/blog/javachen/1190000002532411">
         http://segmentfault.com/blog/javachen/1190000002532411
        </a>
       </p>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/20751.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/09/t0143d1824aeb41cc0a-300x169.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20751.html" rel="bookmark" title="Spark 1.5.0发布：新增机器学习算法工具，扩展Spark R API">
         Spark 1.5.0发布：新增机器学习算法工具，扩展Spark R API
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20368.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/08/QQ截图20150412200335-300x192.png"/>
        </a>
        <a class="link" href="http://dataunion.org/20368.html" rel="bookmark" title="Spark大数据分析框架的核心部件全解析">
         Spark大数据分析框架的核心部件全解析
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20101.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/07/t01673770f1417f655a_副本.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20101.html" rel="bookmark" title="在Apache Spark上跑Logistic Regression算法">
         在Apache Spark上跑Logistic Regression算法
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20055.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/07/QQ截图20150720211801_副本.png"/>
        </a>
        <a class="link" href="http://dataunion.org/20055.html" rel="bookmark" title="Spark与Flink：对比与分析">
         Spark与Flink：对比与分析
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F10345.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/10345.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/10345.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>